﻿<Window x:Class="AnimatedFlags.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525">
    <Canvas>
        <Rectangle Width="200" Height="40" Fill="White" x:Name="Bulgarian1">
            <Rectangle.Triggers>
                <EventTrigger RoutedEvent="Rectangle.Loaded">
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetName="Bulgarian1" Storyboard.TargetProperty="(Opacity)"
                                             From="1" To="0" Duration="00:00:1.00" 
                                             AutoReverse="True" RepeatBehavior="Forever"/>
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger>
            </Rectangle.Triggers>
        </Rectangle>
        <Rectangle Width="200" Height="40" Fill="Green" x:Name="Bulgarian2" Canvas.Top="40">
            <Rectangle.Triggers>
                <EventTrigger RoutedEvent="Rectangle.Loaded">
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetName="Bulgarian2" Storyboard.TargetProperty="(Opacity)"
                                             From="1" To="0" Duration="00:00:1.00" 
                                             AutoReverse="True" RepeatBehavior="Forever"/>
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger>
            </Rectangle.Triggers>
        </Rectangle>
        <Rectangle Width="200" Height="40" Fill="Red" x:Name="Bulgarian3" Canvas.Top="80">
            <Rectangle.Triggers>
                <EventTrigger RoutedEvent="Rectangle.Loaded">
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetName="Bulgarian3" Storyboard.TargetProperty="(Opacity)"
                                             From="1" To="0" Duration="00:00:1.00" 
                                             AutoReverse="True" RepeatBehavior="Forever"/>
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger>
            </Rectangle.Triggers>
        </Rectangle>
        <Rectangle Width="200" Height="40" Fill="Black" x:Name="German1">
            <Rectangle.Triggers>
                <EventTrigger RoutedEvent="Rectangle.Loaded">
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetName="German1" Storyboard.TargetProperty="(Opacity)"
                                             From="0" To="1" Duration="00:00:1.00" 
                                             AutoReverse="True" RepeatBehavior="Forever"/>
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger>
            </Rectangle.Triggers>
        </Rectangle>
        <Rectangle Width="200" Height="40" Fill="Red" x:Name="German2" Canvas.Top="40">
            <Rectangle.Triggers>
                <EventTrigger RoutedEvent="Rectangle.Loaded">
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetName="German2" Storyboard.TargetProperty="(Opacity)"
                                             From="0" To="1" Duration="00:00:1.00" 
                                             AutoReverse="True" RepeatBehavior="Forever"/>
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger>
            </Rectangle.Triggers>
        </Rectangle>
        <Rectangle Width="200" Height="40" Fill="Yellow" x:Name="German3" Canvas.Top="80">
            <Rectangle.Triggers>
                <EventTrigger RoutedEvent="Rectangle.Loaded">
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetName="German3" Storyboard.TargetProperty="(Opacity)"
                                             From="0" To="1" Duration="00:00:1.00" 
                                             AutoReverse="True" RepeatBehavior="Forever"/>
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger>
            </Rectangle.Triggers>
        </Rectangle>
    </Canvas>
</Window>
